#! /usr/bin/env python

PACKAGE='image_proc'
import roslib; roslib.load_manifest(PACKAGE)

from dynamic_reconfigure.parameter_generator import *

gen = ParameterGenerator()

# Decimation parameters
gen.add("decimation_x", int_t, 0, "Number of pixels to decimate to one horizontally", 1, 1, 16)
gen.add("decimation_y", int_t, 0, "Number of pixels to decimate to one vertically", 1, 1, 16)

# ROI parameters
# Maximums are arbitrary set to the resolution of a 5Mp Prosilica, since we can't set
# the dynamically.
gen.add("x_offset",     int_t, 0, "X offset of the region of interest", 0, 0, 2447)
gen.add("y_offset",     int_t, 0, "Y offset of the region of interest", 0, 0, 2049)
gen.add("width",        int_t, 0, "Width of the region of interest", 0, 0, 2448)
gen.add("height",       int_t, 0, "Height of the region of interest", 0, 0, 2050)

# First string value is node name, used only for generating documentation
# Second string value ("CropDecimate") is name of class and generated
#    .h file, with "Config" added, so class CropDecimateConfig
exit(gen.generate(PACKAGE, "image_proc", "CropDecimate"))
